package com.neulogistics.core.customercenter.api.application.query;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
public class CustomerQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 当前页号
     */
    @Positive(message = "当前页数非法！")
    private long pageNum = 1;

    /**
     * 页面大小
     */
    @Positive
    @Max(value = 20, message = "请求数据过多！")
    private long pageSize = 10;


    /**
     * 客户名
     */
    @Size(max = 10, message = "客户名不能超过10！")
    private String customerName;

    /**
     * 单位名
     */
    @Size(max = 50, message = "单位名不能超过50！")
    private String flatsName;

    /**
     * 客户电话
     */
    @Size(max = 11)
    private String customerPhone;

    /**
     * 邮件地址
     */
    @Email(message = "错误的邮件地址！")
    private String customerEmail;
}
